﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharePointCommander.Model.PropertySheet
{
    public interface PropertyItem
    {
        string Name { get; set; }
        bool ReadOnly { get; set; }
        bool ReadWrite { get; }
        bool Changed { get; set; }
        string ValueType { get; set; }
    }

    public abstract class PropertyItem<T> : PropertyItem
    {
        public T Value { get; set; }
        public string Name { get; set; }
        public string ValueType { get; set; }
        public bool ReadOnly { get; set; }
        public bool ReadWrite { get { return !ReadOnly; } }
        public bool Changed { get; set; }

        public PropertyItem(string name, T value)
        {
            this.Name = name;
            this.Value = value;
        }
    }
}
